
package com.bei_en.teacher.management.persistence.dao.system;

import java.util.List;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;
import com.bei_en.teacher.management.model.system.bean.SystemResource;
import com.bei_en.teacher.management.model.system.condition.SystemResourceCondition;
import com.bei_en.teacher.management.persistence.dao.BaseDao;

/**
 * 后台权限相关资源
 * @author Longqs
 * @date 2016-6-15 15:09:26
 */
@Repository
public interface SystemResourceDao extends BaseDao<SystemResource, Integer> {

    Integer findNumberByCondition(SystemResourceCondition vo);

    List<SystemResource> findPageBreakByCondition(SystemResourceCondition vo, RowBounds rb);

    /**
     * 返回上次插入的id，用于merge
     * @return
     */
    Integer findLastInsertedId();

    /**
     * @author Longqs
     * @param userId
     * @return
     */
     List<SystemResource> findResourcesByUserId(Integer userId);
}
